import axios from 'axios'




// 获取表格数据（兼顾搜索功能）
export const getList = (pageNum, pageSize, query) => this.$http.get('users/getTableList', { params: { pageNum, pageSize, query } })
// 添加记录
export const add = (infos) => this.$http.post('EquipmentinfofileAction/addObject', { infos })
// 添加记录
// export const add = (equipmentNo, name) => axios.post("http://localhost:8088/CommunityManagement/EquipmentinfofileAction/addObject", { equipmentNo, name });
// 删除记录（批量）
export const deleteSelected = (ids) => this.$http.post('users/delteSelected', { ids })
// 删除记录（当前）
export const deleteCurrent = (id) => this.$http.post('users/deleteCurrent', { id })
// 查看修改记录（当前）
export const getEditInfo = (id) => this.$http.post('users/getEditCurrent', { id })
// 确认修改记录（当前）
export const edit = (id, email, mobile) => this.$http.post('users/editCurrent', { id, email, mobile })
// 查看详情（当前）
export const getDetail = (id) => this.$http.get('users/getDetail', { id })
// 修改状态
export const modifySwitch = (id, state) => this.$http.post('user/modifySwitch', { id, state })

// 例子
// export const deleteUser = (id) => axios.delete("/api/v1/pri/user/delete/" + id)